package com.kaili.basic.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.kaili.basic.mapper.BaseStoreLocationMapper;
import com.kaili.basic.pojo.dto.BaseStoreLocationQueryDto;
import com.kaili.basic.pojo.entity.BaseStoreLocationEntity;
import com.kaili.basic.pojo.vo.BaseStoreLocationVO;
import com.kaili.basic.service.BaseStoreLocationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;

@Service
public class BaseStoreLocationServiceImpl extends ServiceImpl<BaseStoreLocationMapper, BaseStoreLocationEntity> implements BaseStoreLocationService {
    @Autowired
    public BaseStoreLocationMapper baseStoreLocationMapper;

    @Override
    public Page<BaseStoreLocationEntity> queryPageList(Page<BaseStoreLocationEntity> page, BaseStoreLocationQueryDto queryDto) {
        page.setRecords(baseStoreLocationMapper.queryPageList(page,queryDto));
        return page;
    }

    @Override
    public Long queryStoreLocationCoude() {
        return baseStoreLocationMapper.queryStoreLocationCoude();
    }

    @Override
    public void updateDefaultLocation(Map<String, Object> map) {
        baseStoreLocationMapper.updateDefaultLocation(map);
    }

    @Override
    public List<BaseStoreLocationVO> storeLocationExport(BaseStoreLocationQueryDto queryDto) {
        return baseStoreLocationMapper.storeLocationExport(queryDto);
    }

    @Override
    public List<BaseStoreLocationEntity> queryPageList(BaseStoreLocationQueryDto queryDto) {
        return baseStoreLocationMapper.queryPageList(queryDto);
    }
}
